/**
 * zhanjun
 */

$(function() {
	
	
	$("#btn_reset").click(function() {
		document.getElementById("dataform").reset();

		location.href='operation-admin.html';
		
	});
	/*
	 * 保存事件
	 */

	$("#btn_submit").click(function() {
		var postdata = $('#dataform').serialize();
		
		if($('#dataform').form('validate')){		
			$.ajax({
				type : "POST",
				url : "../operation/ser_save.do",
				data : postdata,
				success : function(msg) {
					alert(msg);
					document.getElementById("dataform").reset();					
				}
			});
		}
	});

});
